package com.wechat.service.quartz.job;

import org.quartz.DisallowConcurrentExecution;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.stereotype.Component;
@Component
@DisallowConcurrentExecution//防止并发
public class TestJob extends AbstractJob{
	
	public final static String TASKCRON = "1 * * * * ?";
	public final static String TASKNAME = "TaskName";
	public final static String TASKGROUP = "TaskGroup";
	public final static String TASKDESC = "TaskDesc";

	@Override
	public void execute(JobExecutionContext context) throws JobExecutionException {
		System.out.println("要执行的方法"+System.currentTimeMillis()/1000);
		try {
			//Thread.sleep(1000*30);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		System.out.println("要执行的方法"+System.currentTimeMillis()/1000);
		
	}

	@Override
	public String getTaskCron() {
		return TASKCRON;
	}

	@Override
	public String getTaskName() {
		return TASKNAME;
	}

	@Override
	public String getTaskGroup() {
		return TASKGROUP;
	}

	@Override
	public String getTaskDesc() {
		return TASKDESC;
	}

}
